<template>
  <div class="lis-jcsj-xmgl-add z-col">
    <div class="z-row z-flex--wrap">
      <el-form-item label="仪器" label-width="80">
        <el-select v-model="addFormData.yqid" disabled>
          <el-option v-for="it in yqList" :key="it.id" :label="it.yqmc" :value="it.id"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="检索码" label-width="80">
        <el-input v-model="addFormData.jsm"></el-input>
      </el-form-item>
      <el-button @click="query" class="z-btn-start" type="success">查询</el-button>
      <el-button @click="addRest" type="warning">清除</el-button>
      <el-button @click="save" type="primary">确定</el-button>
    </div>
    <el-table :data="tableData" height="600" ref="table" stripe>
      <el-table-column type="selection" />
      <el-table-column label="仪器名称" width="200" prop="yqmc" />
      <el-table-column label="英文缩写" width="90" prop="tdm" />
      <el-table-column label="报告项目名称" width="200" prop="zbmc" />
      <el-table-column label="项目归类" width="90" prop="lb" />
      <!-- <el-table-column label="单位" width="90" prop="zbmc" /> -->
    </el-table>
  </div>
</template>
<script lang="ts" setup>
import { yqList } from '@utils'
import { use } from './use'
import { xmglAddProps, xmglAddEmits } from './prop'
defineOptions({
  name: 'lis-jcsj-xmgl-add'
})
const props = defineProps(xmglAddProps)
const emit = defineEmits(xmglAddEmits)
const { addFormData, addRest, query, save, tableData, table, clear } = use(props, emit)
defineExpose({
  clear
})
</script>
<style lang="scss">
.lis-jcsj-xmgl-add {
  width: 100%;
  .el-form-item {
    width: 33.33%;
  }
}
</style>
